package com.bungarus.om.model;

import com.fasterxml.jackson.annotation.JsonRootName;

import java.io.Serializable;

/**
 * Created by tang on 2018/12/12.
 */
@JsonRootName("error")
public class BungarusError implements Serializable{
    private String message;
    private String type;
    private int code;
    private String error_subcode;
    private String error_user_msg;
    private String trace_id;

    public static Builder newBuilder() {
        return new Builder();
    }

    public static class Builder {
        private BungarusError error = new BungarusError();
        public Builder message(String msg) {
            error.setMessage(msg);
            return this;
        }

        public Builder type(String type) {
            error.setType(type);
            return this;
        }

        public Builder code(int code) {
            error.setCode(code);
            return this;
        }

        public Builder subcode(String subcode) {
            error.setError_subcode(subcode);
            return this;
        }

        public Builder user_msg(String user_msg) {
            error.setError_user_msg(user_msg);
            return this;
        }

        public Builder trace_id(String traceId) {
            error.setTrace_id(traceId);
            return this;
        }

        public BungarusError build() {
            return error;
        }
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getError_subcode() {
        return error_subcode;
    }

    public void setError_subcode(String error_subcode) {
        this.error_subcode = error_subcode;
    }

    public String getError_user_msg() {
        return error_user_msg;
    }

    public void setError_user_msg(String error_user_msg) {
        this.error_user_msg = error_user_msg;
    }

    public String getTrace_id() {
        return trace_id;
    }

    public void setTrace_id(String trace_id) {
        this.trace_id = trace_id;
    }
}
